package org.shiwen.week6.answer;

public class PC {
    private CPU cpu;
    private HardDisk hardDisk;

    public CPU getCpu() {
        return cpu;
    }

    public void setCpu(CPU cpu) {
        this.cpu = cpu;
    }

    public HardDisk getHardDisk() {
        return hardDisk;
    }

    public void setHardDisk(HardDisk hardDisk) {
        this.hardDisk = hardDisk;
    }

    public void show() {
        System.out.println("CPU的频率为：" + cpu.getSpeed());
        System.out.println("硬盘容量为：" + hardDisk.getAmount());
    }
}
